<script>
	var paidOut = <?php echo(!empty($paymentVoucher->issued_date) ? 'true' : 'false'); ?>;
</script>

<div class="grid_16 content_header clearfix">
	<h3 class="float-left">Pay Out / Issue Payment Voucher</h3>
	<span class="float-right">
		<?php
		$this->menu = array(
			array('label' => 'Back to List', 'url' => array('/paymentVoucher/index'))
		);
		?>
	</span>
</div>

<div class="grid_16">
    <div class="activate-structure form">
		<?php
		$form = $this->beginWidget('PsActiveForm', array(
			'id' => 'issue-payment-voucher-form',
			'enableAjaxValidation' => false,
			'htmlOptions' => array(
				'class' => 'form'
			)
				));
		?>
		<div class="table-block">
            <table class="form-table">
				<tr>
					<th scope="row" width="160">
						<?php
						echo CHtml::radioButtonList('issued', '', array('0' => 'Not Issued', '1' => 'Issued'), array('separator' => ''));
						?>

					</th>
					<th class="issued-date" scope="row" width="160">
						<?php echo $form->labelEx($paymentVoucher, 'issued_date', array('label' => 'Payment Voucher Issued On')); ?>
                    </th>
					<td class="issued-date" width="150">
						<?php
						$form->widget('PsJuiDatePicker', array(
							'model' => $paymentVoucher,
							'attribute' => 'issued_date',
							'options' => array(
								'showButtonPanel' => false,
								'changeYear' => true,
								'dateFormat' => 'dd-mm-yy',
							),
						));
						?>
						<?php echo $form->error($paymentVoucher, 'issued_date'); ?>
					</td>
					<td>
						<?php echo GxHtml::submitButton('Update', array('name' => 'submit', 'class' => 'no-margin')); ?>
                    </td>
				</tr>
			</table>
        </div>
		<?php $this->endWidget(); ?>
	</div>
</div>